<template>
  <div>
    <Sort :isdisable="isShowAddorUpdate" />
    <SpuList
      v-if="isShowAddorUpdate === '1'"
      @SwitchAddorUpdate="SwitchAddorUpdate"
    />
    <AddSorUpdateSpu
      v-else-if="isShowAddorUpdate === '2'"
      @SwitchAddorUpdate="SwitchAddorUpdate"
    />
    <AddSku
      v-else-if="isShowAddorUpdate === '3'"
      @SwitchAddorUpdate="SwitchAddorUpdate"
    ></AddSku>
  </div>
</template>

<script>
import SpuList from './components/SpuList.vue'
import AddSorUpdateSpu from './components/AddSorUpdateSpu.vue'
import AddSku from './components/addSku.vue'
export default {
  name: 'Spu',
  data() {
    return {
      isShowAddorUpdate: '1'
    }
  },
  methods: {
    SwitchAddorUpdate(val) {
      this.isShowAddorUpdate = val
    }
  },

  components: {
    SpuList,
    AddSorUpdateSpu,
    AddSku
  }
}
</script>

<style lang="less" scoped></style>
